package com.xxx.demo.service;

import com.baomidou.mybatisplus.core.metadata.IPage;
import com.xxx.demo.entity.CustomerEntity;
import com.baomidou.mybatisplus.extension.service.IService;

/**
 *
 */
public interface CustomerService extends IService<CustomerEntity> {
    /**
     * 根据id查询用户
     * @param id
     * @return
     */
    CustomerEntity findByCustomerId(Long id);

    /**
     * 根据账号密码查询用户
     * @param customerName
     * @param customerPwd
     * @return
     */
    CustomerEntity findByCustomerNameAndPwd(String customerName,String customerPwd);

    /**
     * 注册用户
     * @param customerEntity
     * @return
     */
    Integer registerCustomer(CustomerEntity customerEntity);

    /**
     *根据账号查询
     * @param customerName
     * @return
     */
    Integer queryCustomerByUserName(String customerName);

    /**
     * 根据id修改
     * @param customer
     * @return
     */
    Integer updateByCustomerId(CustomerEntity customer);

    /**
     * 分页查询用户
     * @param pageNo
     * @param pageSize
     * @param customer
     * @return
     */
    IPage<CustomerEntity> selectCustomerPage(Integer pageNo, Integer pageSize, CustomerEntity customer);

    /**
     * 逻辑删除用户
     * @param id
     */
    Integer deleteByCustomer(Long id);
}
